package com.ph.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ph.shopping.facade.merchant.service.IMerchantService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @version 1.0.0
 * @项目：phshopping
 * @描述： 会员页面
 * @作者： xkw
 * @创建时间： 2017/3/28
 * @Copyright by xkw
 */
@Controller
@RequestMapping("/shopping/merchant")
public class MerchantController {
    /*日志记录器*/
    private static final Logger logger = LoggerFactory.getLogger(OrderController.class);

    /*会员接口*/
    @Reference(version = "1.0.0")
    private IMerchantService iMerchantService;

    /**
     * 通过父级iid获取下面的区域
     */
    @RequestMapping(value = "/getAllPosition", method = RequestMethod.POST)
    @ResponseBody
    public Object getAllPosition(@RequestParam(value = "pid") String pid,
                                 @RequestParam(value = "type") String type) {
        return this.iMerchantService.getPositionByIdAndType(pid, type);
    }

}
